package forms

type GoodsSearch struct {
	KeyWords     string `form:"key_words" json:"key_words" binding:""`
	ShopMinPrice int32  `form:"shop_min_price" json:"shop_min_price" binding:"number"`
	ShopMaxPrice int32  `form:"shop_max_price" json:"shop_max_price" binding:"number"`
	CategoryID   int32  `form:"category_id" json:"category_id" binding:"number"`
	Sort         bool   `form:"sort" json:"sort" binding:"boolean"`
	SortField    string `form:"sort_field" json:"sort_field" binding:""`
	Page         int32  `form:"page" json:"page" binding:"number"`
	PageSize     int32  `form:"page_size" json:"page_size" binding:"number"`
}

type GoodsDescID struct {
	GoodsID string `form:"goods_id" json:"goods_id" binding:"required"`
}

type GoodsRandom struct {
	CategoryID *int32 `form:"category_id" json:"category_id" binding:"omitempty,number"`
	IsNew      int32  `form:"is_new" json:"is_new" binding:"max=1,min=0"`
	Size       int    `form:"size" json:"size" binding:""`
	Split      int    `form:"split" json:"split" binding:""`
}

//type FoodCreate struct {
//	Name       string  `form:"name" json:"name" binding:"required,min=1,max=20"`
//	Desc       string  `form:"desc" json:"desc" binding:"required,min=1,max=100"`
//	Price      float32 `form:"price" json:"price" binding:"required"`
//	CategoryId int32   `form:"category_id" json:"category_id" binding:"required"`
//}
//
//type FoodDelete struct {
//	ID int32 `form:"id" json:"id" binding:"required"`
//}
